################################################################################
# 3d flow through porous media ablating cylindrical fibers
#
# Note:
#  - The "comm/sort” option to the “global” command is used to match MPI runs.
#  - The “twopass” option is used to match Kokkos runs.
# The "comm/sort" and "twopass" options should not be used for production runs.
################################################################################

seed	    	    12345
dimension   	    3
global              gridcut 0.0 comm/sort yes

boundary	    r r o

create_box  	    0 100 0 100 0 100
create_grid 	    100 100 100 block * * *

balance_grid        rcb cell

global		    nrho 1 fnum 1

species		    air.species N O
mixture		    air N O vstream 0 0 -100.0 

compute             COMP isurf/grid all all n
fix                 FIX ave/grid all 1 10 10 c_COMP[*] ave one
fix                 ablate ablate all 10 5.0 f_FIX

global              surfs implicit

read_isurf          all 100 100 100 fibers-101x101x101.binary 127.5 ablate

surf_collide	    1 diffuse 300.0 0.0
surf_modify         all collide 1

collide             vss air air.vss

create_particles    air n 0 twopass
fix		    in emit/face air zhi twopass

timestep 	    1e-3

#dump                2 image all 10 binary.*.ppm type type &
#                    pdiam 0.0000015 particle yes &
#                    sline no 0.002 surf proc 0.03 size 1024 1024 &
#                    axes yes 1 0.01 zoom 1.2
#dump_modify	    2 pad 4 pcolor * blue backcolor white

stats		    10
stats_style	    step cpu np nattempt ncoll nscoll nscheck f_ablate

# run 3-5x longer for a better movie

run 		    100
